<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>毕业生管理</title>
<link rel="stylesheet" href="/resources/css/admin/stuguanli.css">
</head>
<body>
	<div class="header">
		<div class="box1">
			<div class="box2">毕业生管理</div>
			<div class="box3"><a href="index">返回首页</a></div>
		</div>
	</div>
	<div class="body">
		<form action="sousuo" method="post">
			<ul class="shou">
				<li class="box"><input name="stuXh" class="kuang" type="text" placeholder="请输入学号"></li>
				<li class="but"><input class="an" type="submit" value="搜索"></li>
			</ul>
		</form>
		
		<div>
			<a href="addstu"><div class="addstu">添加毕业生信息</div></a>
			<table border="1">
				<tr>
					<th style="width:267px;">姓名</th>
					<th style="width:267px;">院系</th>
					<th style="width:267px;">专业</th>
					<th style="width:267px;">操作</th>
				</tr>
				<c:choose>
					<c:when test="${not empty stupage }">
						<c:forEach items="${stupage.list}" var="stu">
							<tr>
								<td style="width:267px; text-align: center;">${stu.sName}</td>
								<td style="width:267px; text-align: center;">${stu.sDepartment}</td>
								<td style="width:267px; text-align: center;">${stu.sMajor}</td>
								<td style="width:267px; text-align: center;"><p><a href="details?id=${stu.sId}">详情</a></p><p><a href="delete?id=${stu.sId}">删除</a></p></td>
							</tr>
						</c:forEach>
					</c:when>
				</c:choose>
			</table>
			
			<div class="page">
				<ul class="pageinfo">
					<a href="stu?page=${stupage.pageNum-1}">
						<li class="top_under"> 
							上一页
						</li>
					</a>
					<c:forEach begin="1" end="${stupage.pages}" var="pageNum">
						<a href="stu?page=${pageNum}"><li class="num">${pageNum}</li></a>
					</c:forEach>
				
					<a href="stu?page=${stupage.pageNum+1}">
						<li class="top_under"> 
							下一页
						</li>
					</a>
					
				</ul>
			</div>
			
		</div>
	</div>
</body>
</html>